package com.project.restaurant.mapper;

import com.project.restaurant.pojo.MealPicture;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 作者
 * @since 2022-10-11
 */
@Mapper
public interface MealPictureMapper extends BaseMapper<MealPicture> {

    @Results(id = "MealPictureResultMap",value = {
            @Result(column = "meal_picture_url")
    })
    @Select("select meal_picture_url from r_meal_picture where meal_id=${mealId}")
    public List<String> selectPictureByMealId(int mealId);
}
